package cn.eeepay.framework.dao.tradeWarning;

import cn.eeepay.framework.model.tradeWarning.TradeWarningInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface TradeWarningDao {

    @Select(
            "select * from trade_warning where warning_code=#{warningCode}"
    )
    TradeWarningInfo getTradeWarningInfo(@Param("warningCode") String warningCode);

    @Update(
           " UPDATE trade_warning " +
                   " SET rules_values=#{info.rulesValues},cd_time=#{info.cdTime},phones=#{info.phones},update_time=NOW(),update_person=#{info.updatePerson} " +
                   " where warning_code=#{info.warningCode}"
    )
    int saveTradeWarningInfo(@Param("info")TradeWarningInfo info);
}
